de.cebis.moccapart.calendar.domain.composite
Class CalendarComponentContainer

java.lang.Object
  extended by de.cebis.moccabox.domain.AbstractConceptualObject
      extended by de.cebis.moccapart.calendar.domain.composite.CalendarComponentContainer
All Implemented Interfaces:
de.cebis.moccabox.domain.IPersistentConcept, java.io.Serializable

public class CalendarComponentContainer
extends de.cebis.moccabox.domain.AbstractConceptualObject
implements java.io.Serializable

Überschrift:

Beschreibung: Class that is used as a container for CalendarEvent objects. It provides several useful methods to work with corresponding objects.

Copyright: Copyright (c) 2003

Organisation:

Version:
1.0
Author:
Christian Weichelt
See Also:
Serialized Form

Field Summary
static int GROUPBY_CALENDARID
           
static int GROUPBY_CATEGORY
           
static int GROUPBY_LOCATION
           
static int GROUPBY_NOTHING
           
static int GROUPBY_ORGANISERID
           
static int NAME
          Identifiziert den Bezeichner, mit dem ein Kalender identifiziert werden soll.
static int OWNER
          Identifiziert den Bezeichner, mit dem ein Kalender identifiziert werden soll.
static int PRIVATE
           
static java.lang.String PROP_FIRSTDAY
           
static java.lang.String PROP_LASTDAY
           
static java.lang.String PROP_VIEW
           
static int PUBLIC
           
static int VIEW_DAY
           
static int VIEW_GROUP
           
static int VIEW_LIST
           
static int VIEW_MONTH
           
static int VIEW_WEEK
           
static int VIEW_YEAR
           
 
Fields inherited from interface de.cebis.moccabox.domain.IPersistentConcept
PROP_CREATION_DATE, PROP_ID, PROP_LAST_EDIT_DATE, PROP_LAST_EDIT_USER
 
Constructor Summary
CalendarComponentContainer()
           
 
Method Summary
 void addCalendarEvent(de.cebis.moccapart.calendar.domain.CalendarEvent event)
          Adds a CalendarEvent object to the CalendarComponentContainer.
 void addCalendarEvents(de.cebis.moccapart.calendar.domain.CalendarEvent[] events)
          Adds a CalendarEvent object array to the CalendarComponentContainer.
 java.util.Vector<CalendarTimeUnit> calculateDays()
          Returns the days this CalendarComponentContainer represents.
 boolean containsNoCalendarEvents()
          Returns if there are no CalendarEvent objects in the CalendarComponentContainer.
 boolean containsNoCalendarTasks()
          Returns if there are no CalendarEvent objects in the CalendarComponentContainer.
 de.cebis.moccapart.calendar.domain.Calendar getCalendar()
          Returns the id of a Calendar if container only contains component from this one object.
 CalendarComponentContainer getCalendarComponentContainer()
           
 int getCalendarEventCount()
          Returns number of CalendarEvent objects in the CalendarComponentContainer.
 int getCalendarTaskCount()
          Returns number of CalendarTask objects in the CalendarComponentContainer.
 CalendarTimeUnit[] getCalendarTimeUnits()
          Returns the days this CalendarComponentContainer represents.
 java.util.Date getCurrentDate()
          Liefert das aktuelle Datum zurück.
 CalendarTimeUnit[] getDays()
           
 java.util.Date getFirstDate()
          Returns the first date of the represented CalendarComponent objects.
 java.util.Vector<CalendarTimeUnit> getHours()
          Returns the hours of one day this CalendarComponentContainer represents.
 java.util.Date getLastDate()
          Returns the last date of the represented CalendarComponent objects.
 java.util.Date getNextFirstDate()
          Liefert ausgehend vom aktuellen ersten Datum entsprechend der View das nächste erste Datum zurück.
 java.util.Date getPreviousFirstDate()
          Liefert ausgehend vom aktuellen ersten Datum entsprechend der View das vorhergehende erste Datum zurück.
 int getView()
          Returns the view to be taken for the current container.
 void init()
           
 void instantiateFirstDate()
          Sets the first date of the represented CalendarComponent objects.
 void removeCalendarEvent(int position)
          Removes a CalendarEvent from the CalendarComponentContainer.
 void setCalendar(de.cebis.moccapart.calendar.domain.Calendar calendar)
          Sets the id of a Calendar if container only contains component from this one object.
 void setExactFirstDate(java.util.Date firstdate)
          Sets the first date of the represented CalendarComponent objects without changing start hour, minute, second.
 void setExactLastDate(java.util.Date lastdate)
          Sets the last date of the represented CalendarComponent objects without changing start hour, minute.
 void setFirstDate(java.util.Date firstdate)
          Sets the first date of the represented CalendarComponent objects.
 void setLastDate(java.util.Date lastdate)
          Sets the last date of the represented CalendarComponent objects.
 void setView(int view)
          Sets the view to be taken for the current container.
 
Methods inherited from class de.cebis.moccabox.domain.AbstractConceptualObject
getCreationDate, getId, getLastEditDate, getVersion, initialize, setCreationDate, setId, setLastEditDate, setVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRIVATE

public static final int PRIVATE
See Also:
Constant Field Values

PUBLIC

public static final int PUBLIC
See Also:
Constant Field Values

VIEW_MONTH

public static final int VIEW_MONTH
See Also:
Constant Field Values

VIEW_WEEK

public static final int VIEW_WEEK
See Also:
Constant Field Values

VIEW_DAY

public static final int VIEW_DAY
See Also:
Constant Field Values

VIEW_LIST

public static final int VIEW_LIST
See Also:
Constant Field Values

VIEW_GROUP

public static final int VIEW_GROUP
See Also:
Constant Field Values

VIEW_YEAR

public static final int VIEW_YEAR
See Also:
Constant Field Values

PROP_VIEW

public static final java.lang.String PROP_VIEW
See Also:
Constant Field Values

PROP_FIRSTDAY

public static final java.lang.String PROP_FIRSTDAY
See Also:
Constant Field Values

PROP_LASTDAY

public static final java.lang.String PROP_LASTDAY
See Also:
Constant Field Values

GROUPBY_NOTHING

public static final int GROUPBY_NOTHING
See Also:
Constant Field Values

GROUPBY_LOCATION

public static final int GROUPBY_LOCATION
See Also:
Constant Field Values

GROUPBY_CATEGORY

public static final int GROUPBY_CATEGORY
See Also:
Constant Field Values

GROUPBY_CALENDARID

public static final int GROUPBY_CALENDARID
See Also:
Constant Field Values

GROUPBY_ORGANISERID

public static final int GROUPBY_ORGANISERID
See Also:
Constant Field Values

NAME

public static final int NAME
Identifiziert den Bezeichner, mit dem ein Kalender identifiziert werden soll. Hier ist es der Name der Ressource.

See Also:
Constant Field Values

OWNER

public static final int OWNER
Identifiziert den Bezeichner, mit dem ein Kalender identifiziert werden soll. Hier ist es der Owner der Ressource.

See Also:
Constant Field Values
Constructor Detail

CalendarComponentContainer

public CalendarComponentContainer()
Method Detail

init

public void init()

getCalendarComponentContainer

public CalendarComponentContainer getCalendarComponentContainer()

setCalendar

public void setCalendar(de.cebis.moccapart.calendar.domain.Calendar calendar)
Sets the id of a Calendar if container only contains component from this one object.

Parameters:
calendar - Unique identifier.

getCalendar

public de.cebis.moccapart.calendar.domain.Calendar getCalendar()
Returns the id of a Calendar if container only contains component from this one object.

Returns:
Unique identifier. Null, if not restricted to one object.

removeCalendarEvent

public void removeCalendarEvent(int position)
Removes a CalendarEvent from the CalendarComponentContainer.

Parameters:
position - Specifies the event to be removed.

getCalendarEventCount

public int getCalendarEventCount()
Returns number of CalendarEvent objects in the CalendarComponentContainer.

Returns:
Number of events.

getCalendarTaskCount

public int getCalendarTaskCount()
Returns number of CalendarTask objects in the CalendarComponentContainer.

Returns:
Number of tasks.

containsNoCalendarEvents

public boolean containsNoCalendarEvents()
Returns if there are no CalendarEvent objects in the CalendarComponentContainer.

Returns:
True, if there are no events. False, otherwise.

containsNoCalendarTasks

public boolean containsNoCalendarTasks()
Returns if there are no CalendarEvent objects in the CalendarComponentContainer.

Returns:
True, if there are no events. False, otherwise.

setExactFirstDate

public void setExactFirstDate(java.util.Date firstdate)
Sets the first date of the represented CalendarComponent objects without changing start hour, minute, second.

Parameters:
firstdate - The starting date.

setFirstDate

public void setFirstDate(java.util.Date firstdate)
Sets the first date of the represented CalendarComponent objects.

Parameters:
firstdate - The starting date.

instantiateFirstDate

public void instantiateFirstDate()
Sets the first date of the represented CalendarComponent objects.


getFirstDate

public java.util.Date getFirstDate()
Returns the first date of the represented CalendarComponent objects.

Returns:
The starting date.

getPreviousFirstDate

public java.util.Date getPreviousFirstDate()
Liefert ausgehend vom aktuellen ersten Datum entsprechend der View das vorhergehende erste Datum zurück.

Returns:
Datum, das entsprechend der aktuellen View einen Tag, eine Woche, einen Monat oder eine Jahr vor dem aktuellen ersten Datum liegt.

getCurrentDate

public java.util.Date getCurrentDate()
Liefert das aktuelle Datum zurück.

Returns:
Das aktuelle Systemdatum.

getNextFirstDate

public java.util.Date getNextFirstDate()
Liefert ausgehend vom aktuellen ersten Datum entsprechend der View das nächste erste Datum zurück.

Returns:
Datum, das entsprechend der aktuellen View einen Tag, eine Woche, einen Monat oder eine Jahr nach dem aktuellen ersten Datum liegt.

setLastDate

public void setLastDate(java.util.Date lastdate)
Sets the last date of the represented CalendarComponent objects.

Parameters:
lastdate - The end date.

setExactLastDate

public void setExactLastDate(java.util.Date lastdate)
Sets the last date of the represented CalendarComponent objects without changing start hour, minute.

Parameters:
lastdate - The starting date.

getLastDate

public java.util.Date getLastDate()
Returns the last date of the represented CalendarComponent objects.

Returns:
The end date.

setView

public void setView(int view)
Sets the view to be taken for the current container.

Parameters:
view - VIEW_DAY, for a daily view. VIEW_WEEK, for a weekly view. VIEW_MONTH, for a monthly view.

getView

public int getView()
Returns the view to be taken for the current container.

Returns:
VIEW_DAY, for a daily view. VIEW_WEEK, for a weekly view. VIEW_MONTH, for a monthly view.

addCalendarEvent

public void addCalendarEvent(de.cebis.moccapart.calendar.domain.CalendarEvent event)
Adds a CalendarEvent object to the CalendarComponentContainer.

Parameters:
event - CalendarEvent to be added.

addCalendarEvents

public void addCalendarEvents(de.cebis.moccapart.calendar.domain.CalendarEvent[] events)
Adds a CalendarEvent object array to the CalendarComponentContainer.

Parameters:
events - CalendarEvent to be added.

getDays

public CalendarTimeUnit[] getDays()

calculateDays

public java.util.Vector<CalendarTimeUnit> calculateDays()
Returns the days this CalendarComponentContainer represents.

Returns:
Days that are represented.

getCalendarTimeUnits

public CalendarTimeUnit[] getCalendarTimeUnits()
Returns the days this CalendarComponentContainer represents.

Returns:
Days that are represented.

getHours

public java.util.Vector<CalendarTimeUnit> getHours()
Returns the hours of one day this CalendarComponentContainer represents.

Returns:
Hours that are represented.